

import React, { Component } from 'react';
import { NavLink } from 'react-router-dom'

export default class WeatherFooter extends Component {
    constructor(props) {
        super(props)
        this.state = {
            footerList: [
                { key: '1', text: '首页', name: 'iconfont icon-xiazai45', link: '/', active: true },
               //  { key: '2', text: '其他城市', name: 'iconfont icon-chengshijianshe', link: '/other_home', active: false },
                { key: '3', text: '友情链接', name: 'iconfont icon-link', link: '/my_link', active: false }
            ],
            count:0
        };
    }
    render() {
        return (
            <div className='weather-footer'>
                {
                    this.state.footerList.map(item => {
                        return (
                            <NavLink key={item.key} exact to={item.link} activeClassName='footer-active'>
                                <p className={item.name}></p>
                                <p>{item.text}</p>
                            </NavLink>
                        )
                    })
                }
            </div>
        )
    }
}